﻿const express = require("express");
const bodyParser = require("body-parser"); //字符串解析模块
const cors = require('cors');
const routers = require('./routes/index')

const app = express();
const port = 3006;

app.listen(port, () => { console.log("success: http://localhost:" + port) });
app.get('/', (req, res, next) => {res.send('<p>node 服务开启成功</p>')})

app.use(cors({ origin: "*", credentials: true }));
app.use(express.static(__dirname + "/"));
app.use(bodyParser.json({ limit: '500000mb' })); 
app.use(bodyParser.urlencoded({ extended: false }));


routers(app)

